<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>网络货运平台省运管数据控制台</title>
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="小镖人、社区、网络货运">
    <meta name="description" content="小镖人、社区、网络货运">
    <link rel="stylesheet" href="../../../xbr_layui_extend/layui-v2.6.8/css/layui.css">
</head>
<body>
<div class="layui-fluid" style="padding: 15px;">
    <form class="layui-form" action="" lay-filter="post-form" id="userForm" method="post">
        <div class="layui-row">
            <div class="layui-col-xs10">
                <div class="layui-form-item">
                    <label class="layui-form-label">对公账户</label>
                    <div class="layui-input-block">
                        <input type="text" name="bankAccountNo" lay-verify="required" placeholder="请输入账号" class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-col-xs2" style="text-align: center">
                <div class="layui-form-item">
                    <button class="layui-btn" lay-submit="" lay-filter="post-btn">查询</button>
                </div>
            </div>
        </div>
    </form>
    <!--提交按钮-->
    <!--  结果  -->
    <table class="layui-table" lay-even="" lay-skin="nob">
        <thead><tr><th colspan="4">查询结果如下:</th></tr></thead>
        <tbody id="result" style="display: none">
        <tr>
            <td>账号：</td><td><span class="bind" id="account">--</span></td>
            <td>账户户名：</td><td><span class="bind" id="accountName">--</span></td>
        </tr>
        <tr>
            <td>可用余额：</td><td><span class="bind" id="balance">--</span>元</td>
            <td>账面余额：</td><td><span class="bind" id="totalAmount">--</span>元</td>
        </tr>
        <tr>
            <td>账户状态：</td><td><span class="bind" id="accountStatus">--</span></td>
            <td>冻结金额：</td><td><span class="bind" id="holdBalance">--</span>元</td>
        </tr>
        <tr>
            <td>止付金额：</td><td><span class="bind" id="stopBalance">--</span>元</td>
            <td>昨日余额：</td><td><span class="bind" id="lastBalance">--</span>元</td>
        </tr>
        <tr>
            <td>活期存款计息执行利率：</td><td><span class="bind" id="hRate1">--</span>%</td>
            <td>协定执行利率：</td><td><span class="bind" id="xDRate2">--</span>%</td>
        </tr>
        <tr>
            <td>账户余额：</td><td><span class="bind" id="acctBalance">--</span>元</td>
            <td>协定额度：</td><td><span class="bind" id="agreeDepReserveBalance">--</span>元</td>
        </tr>
        <tr>
            <td>开始生效日期：</td><td><span class="bind" id="beginEffectDate">--</span></td>
            <td>到期日：</td><td><span class="bind" id="expiryDate">--</span></td>
        </tr>
        <tr>
            <td>利息金额：</td><td><span class="bind" id="agreeDepositInterest">--</span>元</td>
            <td>利息种类：</td><td><span class="bind" id="agreeDepositInterestType">--</span></td>
        </tr>
        <tr>
            <td>协定到期日：</td><td><span class="bind" id="enableFlagEndTime">--</span></td>
            <td>账户状态字：</td><td><span class="bind" id="accountStatusDesc">--</span></td>
        </tr>
        </tbody>
    </table>
</div>

<script src="../../../xbr_layui_extend/layui-v2.6.8/layui.js"></script>
<script>
    layui.extend({
        admin: '/platform/xbr_layui_extend/admin' //集成路径
    }).use(["admin", 'form'], function () {
        const $ = layui.$, form = layui.form, admin = layui.admin;

        //上传完毕 提交表单
        form.render(null, 'post-form');
        form.on('submit(post-btn)', function (data) {
            queryPayBankCard(data.field);
            return false;
        });

        //获取付款人（平台）银行卡列表
        function queryPayBankCard(data) {
            admin.req({
                url: "/platform/pab/queryAccount",
                data: data,
                done: function (res) {
                    if (res.data == null) return;
                    $("#result").show();
                    bindResData(res.data)
                }
            });
        }

        //绑定数据
        function bindResData(data) {
            $(".bind").each(function (index,item) {
                $(item).text(data[item.id]);
            })
        }

    });
</script>
</body>
</html>